﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace dome
{
    public partial class yonghu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Request.QueryString传值
            Label1.Text = Request.QueryString["name"];


            //cookie传值
            if (!IsPostBack)
            {
                if (Request.Cookies["name"] != null)
                {
                    HttpCookie cookie = Request.Cookies["name"];
                    Response.Write(Server.UrlEncode(cookie.Value));
                }
                else
                {
                    Response.Write("没有值");
                }
            }

        }
    }
}